package mobao.error;

import org.springframework.boot.autoconfigure.web.DefaultErrorAttributes;
import org.springframework.web.context.request.RequestAttributes;

import java.util.Map;

/**
 * 自定义异常
 * Created by yanghongquan on 2018/8/14 11:42
 */
public class yhqErrorAttributes extends DefaultErrorAttributes{

    @Override
    public Map<String, Object> getErrorAttributes (RequestAttributes requestAttributes,boolean includeStackTrace){
        Map<String, Object> result = super.getErrorAttributes(requestAttributes,includeStackTrace);
        result.remove("exception");
        return result;
    }

}
